<%@page import="com.cn.dao.DepartmentDao"%>
<%@page import="com.cn.entity.Department"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>北京医院</title>
</head>

<body>
<form action="DepartmentAddAction" method="post">
<h5>新增科室</h5>
<table>

<tr>

 <td>科室名称</td>
 <td><input type="text" name="department.departmentname"></td>
</tr>
<tr>

 <td>科室位置</td>
 <td><input type="text" name="department.location"></td>
</tr>
<tr>

 <td>科室介绍</td></tr>
<tr> <td> </td><td><input type="text" name="department.selfintroduce"></td></tr>

<tr> <td><input type="submit" value="增加"> </td></tr>
</table>
</form>


<% DepartmentDao ud=new DepartmentDao(); 
  List<Department> list=ud.scanAll();
%>
<h5>查看所有科室</h5>
<table>

<tr><td>科室名</td>
<td>科室位置</td>

<td>操作</td>


</tr>
<%for (int i=0;i<list.size();i++) { 
Department us=list.get(i);
%>
<tr> <td><%=us.getDepartmentname() %></td><td><%=us.getLocation() %></td>


    

<td><a href="DepartmentDeleteAction?Departmentid=<%=us.getDepartmentid()%>">删除</a>
|<a href="departmentupdate.jsp?departmentid=<%=us.getDepartmentid()%>">修改</a>
|<a href="departmentdetail.jsp?departmentid=<%=us.getDepartmentid()%>">查看详细</a>
</td>

  </tr>

<%} %>
</table>
</body>
</html>